<?php

/**
 * Video form.
 *
 * @package    ilts
 * @subpackage form
 * @author     devlife
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class VideoForm extends BaseVideoForm
{
  public function configure()
  {
    $default = 'Add tags with commas';
    $this->widgetSchema['new_tags'] = new sfWidgetFormInput
    (
    array('label'   =>  'Add Tags', 'default'   =>  $default),
    array(
             'onclick' => "if (this.value=='$default') { 
                                this.value = ''; this.style.color='black'; }", 
             'size'   =>  '32',
       'id' => 'new_tags', 
    // don't let the browser autocomplete.  We'll add typeahead, below
       'autocomplete' => "off",      
       'style' => 'color:#aaa'
       )
       );
     $this->widgetSchema['tag'] = new sfWidgetFormInputText();
       // allow the field to remain blank
       $this->setValidator('new_tags', new sfValidatorString(array('required' => false)));
       $this->setValidator('tag', new sfValidatorString(array('required' => false)));

       // this hidden field will be populated with JavaScript.
       $this->widgetSchema['remove_tags'] = new sfWidgetFormInputHidden();
       $this->setValidator('remove_tags', new sfValidatorString(array('required' => false)));
  }
}
